package pro.cherish.smartfile.module.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 实体类
 * 附件
 * </p>
 *
 * @author lys
 * @since 2019-06-24
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@TableName("f_attachment_chunk_temp")
@ApiModel(value = "AttachmentChunkTemp", description = "附件分块上传临时存储")
public class AttachmentChunkTemp {

    private static final long serialVersionUID = 1L;
    /**
     * 文件总大小
     */
    @ApiModelProperty(value = "文件总大小")
    @TableField("size")
    private Long size;
    /**
     * 文件md5值
     */
    @ApiModelProperty(value = "文件md5值")
    @Length(max = 255, message = "文件md5值长度不能超过255")
    @TableId("file_md5")
    private String fileMd5;

    /**
     * 分块大小
     */
    @ApiModelProperty(value = "分块大小")
    @TableField("chunk_size")
    private Integer chunkSize;
    /**
     * 最后一块分块大小
     */
    @ApiModelProperty(value = "最后一块分块大小")
    @TableField("last_chunk_size")
    private Integer lastChunkSize;
    /**
     * 总块数
     */
    @ApiModelProperty(value = "总块数")
    @TableField("total_chunk")
    private Integer totalChunk;


}
